import os, sys, unittest

def split_path(path):
    retn = []
    while True:
        retn.append(os.path.basename(path))
        path = os.path.dirname(path)
        if path == '/' or path == '':
            break
    retn.reverse()
    return retn

class Render():
    def before_export(self, org_path):
        return True
    def export(self, org_path):
        print("Render %s" % org_path)
        return True
    def after_export(self, org_path):
        return True

class _TestClass(unittest.TestCase):

    def test_split_path(self):
        path = split_path("/home/amo/workspace/file.txt")
        # self.assertTrue(path[0] == 'home' and path[1] == 'amo' and path[2] = 'workspace'
        #         and path[3] == 'file.txt')


if __name__ == "__main__":
    unittest.main()
